﻿@model MvcMusicStore.Helpers.PagedList<MvcMusicStore.Models.Album>
@{
    ViewBag.Title = "后台管理";
    Layout = "~/Areas/Admin/Views/Shared/Admin_Layout.cshtml";
}

@using(Html.BeginForm())
{
	<p class="title">
        <span style="font-size:16px;">@Html.ActionLink("【新增】", "Create", "StoreManager", new {@class="bold" })</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        类型： @Html.DropDownList("GenreId", ViewBag.GenreId as IEnumerable<SelectListItem>, "==请选择==", new { style="width:100px;line-height:20px;"}) &nbsp;&nbsp;
		关键字：@Html.TextBox("keyword",null,new{style="width:450px;line-height:20px;"})
		<input type="submit" value="搜索" style="width:100px;line-height:20px;" class="button"/>
	</p>
}

<table class="tb">
    <tr>
        <th>专辑名称</th>
        <th>专辑类型</th>
        <th>艺术家</th>
        <th>出售价格</th>
        <th>操作</th>
    </tr>
    @foreach (var a in Model)
    {
        <tr>
            <td>@a.Title</td>
            <td>@a.Genre.Name</td>
            <td>@a.Artist.Name</td>
            <td>&#165;@a.Price.ToString("f2")</td>
            <td>
                <a class="bold" href="@Url.Action("Detail", new { id=a.AlbumId})">详细</a>
                <a class="bold" href="@Url.Action("Edit", new { id=a.AlbumId})">编辑</a>
                <a class="bold" href="@Url.Action("Delete", new { id=a.AlbumId})">删除</a>
            </td>
        </tr>
    }
</table>

<p class="pager">
    @if (Model.Count != 0)
    {
        @Html.Pager(Model)
    }
    else
    {
        <p>抱歉，没有找到符合条件的音乐专辑。</p>
    }
</p>